<?php
class login_model extends CI_Model {

	public function __construct()
	{
		parent::__construct();
	}
	
	public function validate($username, $password)
	{
		$this->db->where('username',$username);
		$this->db->where('password',$password);
		$query = $this->db->get('user');
		$num_rows = $query->num_rows();
		if ($num_rows == 1)
			return "Successful";
		else
			return "Unsuccessful";
	}
}
?>
